package com.user.controller;


import com.user.model.vo.ServerZulinVo;
import com.user.param.Result;
import com.user.service.ServerZuLinService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;

@Api(value = "租赁接口")
@RestController
@RequestMapping(value = "/zulin")
public class ServerZuLinController {

    @Autowired
    ServerZuLinService serverZuLinService;

    @ApiOperation(value = "租赁接口")
    @RequestMapping(value = "/serverZulin",method = RequestMethod.POST)
    public Result serverZuLin(@RequestBody @Validated ServerZulinVo serverZulinVo){
        return serverZuLinService.serverZuLin(serverZulinVo);
    }

    @ApiOperation(value = "所有租赁列表")
    @RequestMapping(value = "/zulinList",method = RequestMethod.POST)
    public Result zulinList(@RequestBody @Validated ServerZulinVo serverZulinVo){
        return serverZuLinService.zulinList(serverZulinVo);
    }

    @ApiOperation(value = "个人租赁列表")
    @RequestMapping(value = "/geZulinList",method = RequestMethod.GET)
    public Result geZulinList(HttpServletRequest request){
        return serverZuLinService.geZulinList(request);
    }


}



